package com.engine4cloud.tdf.supervision.feign;

import com.engine4cloud.tdf.common.core.constant.SecurityConstants;
import com.engine4cloud.tdf.common.core.constant.ServiceNameConstants;
import com.engine4cloud.tdf.common.core.util.R;
import com.engine4cloud.tdf.supervision.dto.result.AreaFenceResultDTO;
import com.engine4cloud.tdf.supervision.dto.result.JzdxElectronicCoordinateResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(contextId = "RemoteElectronicFenceService", value = ServiceNameConstants.SUPERVISION_SERVER)
public interface RemoteElectronicFenceService {

    /**
     * 矫正对象已有的电子围栏
     *
     * @param code 矫正对象编号
     * @return R<List < JzdxElectronicCoordinateResultDTO>>
     */
    @GetMapping("/inner/electronic/fence/cor/list")
    R<List<JzdxElectronicCoordinateResultDTO>> list(@RequestParam String code, @RequestHeader(SecurityConstants.FROM) String from);

    /**
     * 工作人员所在行政区划的电子围栏
     *
     * @param deptId 部门id
     * @return R<AreaFenceResultVO>
     **/
    @GetMapping("/inner/electronic/fence/worker/find")
    R<AreaFenceResultDTO> findAreaFence(@RequestParam Long deptId, @RequestHeader(SecurityConstants.FROM) String from);
}
